<?php

App::uses('AppController', 'Controller');

/**
 * Files Controller
 *
 * @author OanhNN
 * @property File $File
 */
class FilesController extends AppController {

    /**
     * Uses Model
     * @var array
     */
    public $uses = array('File', 'User');

    /**
     * Process before do action
     * @return void
     */
    public function beforeFilter() {
        parent::beforeFilter();
        if (!$this->Auth->loggedIn()) {
            $this->Auth->allow('upload', 'download');
        }
    }

    /**
     * Upload file
     * @return void
     */
    public function upload() {
        
    }

    /**
     * Download file
     * @return void
     */
    public function download($id = null) {
        
    }

    /**
     * Delete file
     * @return void
     */
    public function delete($id = null) {
        
    }

    /**
     * Show information of file
     * @return void
     */
    public function view($id = null) {
        
    }

    /**
     * Admin manager files
     * @return void
     */
    public function admin_index() {
        
    }

}
